//
//  CustomTableViewCellButton.m
//  floodAdvisor
//
//  Created by Long Ho on 2/23/10.
//  Copyright 2010 Lafayette College. All rights reserved.
//

#import "CustomTableViewCellButton.h"


@implementation CustomTableViewCellButton

@synthesize button;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        // Initialization code
    }
	button = [[UIButton alloc] init];
	[button setTitle:@"Save" forState:UIControlStateNormal];
	[self.contentView addSubview:button];
	
    return self;
}

- (void) layoutSubviews {
	
	[super layoutSubviews];
	CGRect contentRect = self.contentView.bounds;
	
	button.frame = CGRectMake(contentRect.origin.x + 10, 
							  contentRect.origin.y + 10, 
							  contentRect.size.width - 20, 
							  contentRect.size.height);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {

    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)dealloc {
	[button release];
    [super dealloc];
}


@end
